#include <iostream>
using namespace std;
class AA{
	public:
	virtual void Boil()=0;//加水
	virtual void Brew()=0;//冲泡
	virtual void Pour()=0;//倒杯
	virtual void Puts()=0;//加料
	void make()
{
	Boil();
	Brew();
	Pour();
	Puts();
}
};
class Coffee:public AA{
	public:
	virtual void Boil()//加水
	{
		cout << "煮水" << endl;
	}
	virtual void Brew()//冲泡
	{
		cout << "冲泡" << endl;
	}
	virtual void Pour()//倒杯
	{
		cout << "倒杯" << endl;
	}
	virtual void Puts()//加料
	{
		cout << "加奶" << endl;
	}
};
class Tea:public AA{
	public:
	virtual void Boil()//加水
	{
		cout << "煮水" << endl;
	}
	virtual void Brew()//冲泡
	{
		cout << "冲泡" << endl;
	}
	virtual void Pour()//倒杯
	{
		cout << "倒杯" << endl;
	}
	virtual void Puts()//加料
	{
		cout << "加枸杞" << endl;
	}
};
void dowork(AA*ab)
{
	ab->make();
	delete ab;
}
void test01()
{
	dowork(new Tea);
	cout << "--------------------" << endl;
	dowork(new Coffee);
}
int main()
{
	test01();
	return 0;
}
